package cc.htdf.gwc.datacompare.service;

import cc.htdf.gwc.datacompare.domain.response.ResponseBody;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by JT on 2017/10/11.
 */
@FeignClient("gwc-service-observation")
public interface ObserveDataService {

    @GetMapping("/data/ChengDu")
    ResponseBody fetchChengDuObserveDataByStationsAndDate(@RequestParam("stations") String stations,
                                                          @RequestParam("date") String date,
                                                          @RequestParam("elements") String elements);

    @GetMapping("/data/Score")
    ResponseBody observeDate(@RequestParam("stations") String stations,
                                                          @RequestParam("startDate") String startDate,
                                                          @RequestParam("endDate") String endDate,
                                                          @RequestParam("elements") String elements);

    @GetMapping("/data/ChengDu/{station}")
    @CrossOrigin
    ResponseBody fetchChengDuObserveDataByStationId(@PathVariable("station") String station,
                                                    @RequestParam("elements") String elements);
}
